import type { AppRouteModule } from '@/router/types';

import { LAYOUT } from '@/router/constant';
import { t } from '@/hooks/web/useI18n';

const level: AppRouteModule = {
  path: '/article',
  name: 'Article',
  component: LAYOUT,
  redirect: '/level/menu1/menu1-1/menu1-1-1',
  meta: {
    orderNo: 800,
    icon: 'ion:document-text-outline',
    title: t('routes.hopefly.article.article'),
  },

  children: [
    {
      path: 'new',
      name: 'ArticleNew',
      component: () => import('@/views/hopefly/article/NewArticle.vue'),
      meta: {
        title: '新建文章',
        // ignoreKeepAlive: true,
      },
    },
    {
      path: 'list',
      name: 'ArticleList',
      component: () => import('@/views/hopefly/article/ArticleList.vue'),
      meta: {
        title: '文章列表',
        // ignoreKeepAlive: true,
      },
    },
    {
      path: 'edit/:id',
      name: 'ArticleEdit',
      component: () => import('@/views/hopefly/article/NewArticle.vue'),
      meta: {
        title: '编辑文章',
        hideMenu: true,
      },
    },
    {
      path: 'category',
      name: 'Category',
      component: () => import('@/views/hopefly/article/NewArticle.vue'),
      meta: {
        title: '分类管理',
        // ignoreKeepAlive: true,
      },
    },
  ],
};

export default level;
